package com.crm.jdy.service.drp;

import com.crm.jdy.common.dto.HContractEmpInfoDto;
import com.crm.jdy.common.mapper.FRecordInfoMapper;
import com.crm.jdy.common.pojo.HContractEmpInfo;
import com.crm.jdy.common.mapper.HContractEmpInfoMapper;
import com.crm.jdy.common.pojo.TeamInfo;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.dubbo.config.annotation.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**   
 * @Description:(员工合同表信息服务实现)
 *
 * @version: V1.0
 * @author: kong
 * 
 */
@Service(version = "${service.version}")
@Component
public class HContractEmpInfoServiceImpl  extends ServiceImpl<HContractEmpInfoMapper,HContractEmpInfo> implements HContractEmpInfoService  {

    @Autowired
    HContractEmpInfoMapper hContractEmpInfoMapper;

    @Override
    public PageInfo<HContractEmpInfo> seleteHContractEmpInfo(HContractEmpInfoDto wOutInfo) {
        PageHelper.startPage( wOutInfo.getCurrentPage(),wOutInfo.getPageSize());
        List<HContractEmpInfo> bookList = hContractEmpInfoMapper.seleteHContractEmpInfo(wOutInfo);
        PageInfo<HContractEmpInfo> pageInfo = new PageInfo<HContractEmpInfo>(bookList);
        return pageInfo;
    }

    @Override
    public boolean updateHContractEmpInfo(HContractEmpInfo wOutInfo) {
        return hContractEmpInfoMapper.updateById(wOutInfo) > 0;
    }

    @Override
    public boolean addHContractEmpInfo(HContractEmpInfo wOutInfo) {
        return hContractEmpInfoMapper.insert(wOutInfo) > 0;
    }

    @Override
    public boolean removeHContractEmpInfo(String proId) {
        return hContractEmpInfoMapper.deleteById(proId) > 0;
    }
}